From cbdc70f049e55aa171ca91041edcf5cb4fd8c536 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 1 Nov 2006 13:50:02 +0000 Subject: [PATCH] Create /var/lib/xend/domains on startup if it doesn't exist. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomain.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 99a2c12e83..5660832f78 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -84,6 +84,13 @@ class XendDomain: def init(self): """Singleton initialisation function.""" + dom_path = self._managed_path() + try: + os.stat(dom_path) + except OSError: + log.info("Making %s", dom_path) + os.makedirs(dom_path, 0755) + xstransact.Mkdir(XS_VMROOT) xstransact.SetPermissions(XS_VMROOT, {'dom': DOM0_ID}) -- 2.30.2